package com.it.zhangjun.design.pattern.observer;

/**
 * @className: CustomerObserver
 * @description: 预定蛇果的客户类
 * @author: z00018123
 * @date: 2021/4/29
 **/
public class CustomerObserver implements Observer {
    /**
     * 观察者名字
     */
    private String name;

    public CustomerObserver(String name) {
        this.name = name;
    }

    @Override
    public void update() {
        System.out.println(name + "已收到通知, 将立马过来购买！");
    }
}
